﻿@model ConferenceMasterModel
@{
	Layout = null;
}
@{
	ViewBag.Title = "Index";
}
<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="keywords" content="@Model.Keywords">
	<meta name="description" content="@Model.Description">
	<title>@Model.ConferenceName</title>
	<link rel="stylesheet" href="~/Content/cstyle.css">
	<script src="~/Scripts/tempjs/focus.js" type="text/javascript"></script>
	<script src="~/Scripts/background.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(function () {
			var language = "";
			@if (Model.IsInternational == true) {
				<text>
				language = "@ConstValues.Language.En";
				</text>
			} else {
				<text>
				language = "@ConstValues.Language.Cn";
				</text>
			}

			@if (Request.Cookies["_culture"] == null) {
				<text>
				$("#hidCulture").val(language);
				$("#frmCulture").submit();
				</text>
			} else {
				<text>
				if (language != "@Request.Cookies["_culture"].Value") {
					$("#hidCulture").val(language);
					$("#frmCulture").submit();
				}
				</text>
			}
		});
	</script>
</head>
<body>
	@if (Model.ConferenceModel == ConstValues.ConferenceModelStyle.Left) {
		@Html.Partial("_Left");
	} else if (Model.ConferenceModel == ConstValues.ConferenceModelStyle.Center) {
		@Html.Partial("_Center");
	} else if (Model.ConferenceModel == ConstValues.ConferenceModelStyle.Right) {
		@Html.Partial("_Right");
	}
	@using (Html.BeginForm(nameof(UtilityController.SetCulture),
			nameof(UtilityController).GetControllerName(),
			FormMethod.Post, new { id = "frmCulture" }))
	{
		<input type="hidden" id="hidCulture" name="culture" />
	}
</body>
</html>